package top.lixunda.demo.seata.common.exception;

import lombok.extern.slf4j.Slf4j;

/**
 * @author LiXunda
 * @version time:2019/10/28 13:02
 */
@Slf4j
public class AppException extends RuntimeException {

    private String message;

    public AppException(String message) {
        super(message);
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static AppException message(String message) {
        return new AppException(message);
    }

    @Override
    public void printStackTrace() {
        log.error("APPException：" + message);
    }
}
